import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

export default new Router({
    path: '/',
    mode: 'history', //去掉#号
    routes: [{
        path: '',
        component: r => require.ensure([], () => r(require('../page/home')), 'home')

    },
    // 404页面
    {
        path: '*',
        meta: {
            title: '404-页面找不到啦'
        },
        component: r => require.ensure([], () => r(require('../page/common/404')), 'common')
    },
    {
        path: '/addStudent',
        component: r => require.ensure([], () => r(require('../page/addStudent')), 'addStudent')
    },
    {
        path: '/studentList',
        component: r => require.ensure([], () => r(require('../page/studentList')), 'studentList')
    },
    {
        path: '/addTeacher',
        component: r => require.ensure([], () => r(require('../page/addTeacher')), 'addTeacher')
    },
    {
        path: '/teacherList',
        component: r => require.ensure([], () => r(require('../page/teacherList')), 'teacherList')
    },
    {
        path: '/addSubject',
        component: r => require.ensure([], () => r(require('../page/addSubject')), 'addSubject')
    },
    {
        path: '/subjectList',
        component: r => require.ensure([], () => r(require('../page/subjectList')), 'subjectList')
    },
    {
        path: '/addClass',
        component: r => require.ensure([], () => r(require('../page/addClass')), 'addClass')
    },
    {
        path: '/classList',
        component: r => require.ensure([], () => r(require('../page/classList')), 'classList')
    },
    // 第二个
    {
        path: '/largeClassList',
        component: r => require.ensure([], () => r(require('../page/largeClassList')), 'largeClassList')
    },
    {
        path: '/addLargeClass',
        component: r => require.ensure([], () => r(require('../page/addLargeClass')), 'addLargeClass')
    },
    {
        path: '/teacherLiveCourse',
        component: r => require.ensure([], () => r(require('../page/teacherLiveCourse')), 'teacherLiveCourse')
    },
    {
        path: '/addSmallClass',
        component: r => require.ensure([], () => r(require('../page/addSmallClass')), 'addSmallClass')
    },
    {
        path: '/smallClassList',
        component: r => require.ensure([], () => r(require('../page/smallClassList')), 'smallClassList')
    },
    {
        path: '/addOnetoOne',
        component: r => require.ensure([], () => r(require('../page/addOnetoOne')), 'addOnetoOne')
    },
    {
        path: '/oneToOneList',
        component: r => require.ensure([], () => r(require('../page/oneToOneList')), 'oneToOneList')
    },
    {
        path: '/addDemandClass',
        component: r => require.ensure([], () => r(require('../page/addDemandClass')), 'addDemandClass')
    },
    {
        path: '/demandList',
        component: r => require.ensure([], () => r(require('../page/demandList')), 'demandList')
    },
    {
        path: '/addFaceToFaceClass',
        component: r => require.ensure([], () => r(require('../page/addFaceToFaceClass')), 'addFaceToFaceClass')
    },
    {
        path: '/faceToFaceList',
        component: r => require.ensure([], () => r(require('../page/faceToFaceList')), 'faceToFaceList')
    },
    // 第三个
    {
        path: '/addQuestions',
        component: r => require.ensure([], () => r(require('../page/addQuestions')), 'addQuestions')
    },
    {
        path: '/questionList',
        component: r => require.ensure([], () => r(require('../page/questionList')), 'questionList')
    },
    {
        path: '/addTestPaper',
        component: r => require.ensure([], () => r(require('../page/addTestPaper')), 'addTestPaper')
    },
    {
        path: '/testPaperList',
        component: r => require.ensure([], () => r(require('../page/testPaperList')), 'testPaperList')
    },
    {
        path: '/testResult',
        component: r => require.ensure([], () => r(require('../page/testResult')), 'testResult')
    },
    // 选择班级
    {
        path: '/chooseClass',
        component: r => require.ensure([], () => r(require('../page/chooseClass')), 'chooseClass')
    },
    {
        path: '/chooseCourse',
        component: r => require.ensure([], () => r(require('../page/chooseCourse')), 'chooseCourse')
    },
    {
        path: '/chooseTopic',
        component: r => require.ensure([], () => r(require('../page/chooseTopic')), 'chooseTopic')
    },
    // testResultList
    // 登陆注册
    {
        path: '/login',
        component: r => require.ensure([], () => r(require('../page/login')), 'login')
    },
    {
        path: '/schoolRegister',
        component: r => require.ensure([], () => r(require('../page/schoolRegister')), 'schoolRegister')
    },
    {
        path: '/studentRegister',
        component: r => require.ensure([], () => r(require('../page/studentRegister')), 'studentRegister')
    },
    {
        path: '/forgetPass',
        component: r => require.ensure([], () => r(require('../page/forgetPass')), 'forgetPass')
    },
    // 学生开始
    {
        path: '/studentMange',
        component: r => require.ensure([], () => r(require('../components/SideNavStudent')), 'SideNavStudent'),
        children: [{
            path: '',
            component: r => require.ensure([], () => r(require('../page/liveClass')), 'liveClass'),
            meta: [{
                name: '在线课堂',
                path: '/studentMange'
            }]
        },
        {
            path: '/studentMange/liveCourse',
            component: r => require.ensure([], () => r(require('../page/liveCourse')), 'liveCourse'),
            meta: [{
                name: '在线课堂',
                path: '/studentMange'
            }, {
                name: '学小思教育',
                path: '/studentMange'
            }, {
                name: '直播课程',
                path: '/studentMange/schoolCourses'
            }, {
                name: '进入教室',
                path: '/studentMange/liveCourse'
            }, {
                name: '数学',
                path: '/studentMange/schoolCourses'
            }]
        },
        {
            path: '/studentMange/schoolCourses',
            component: r => require.ensure([], () => r(require('../page/schoolCourses')), 'schoolCourses'),
            meta: [{
                name: '在线课堂',
                path: '/studentMange'
            }, {
                name: '学小思教育',
                path: '/studentMange'
            }, {
                name: '直播课程',
                path: '/studentMange/schoolCourses'
            }, {
                name: '数学',
                path: '/studentMange/schoolCourses'
            }]
        },
        {
            path: '/studentMange/classBack',
            component: r => require.ensure([], () => r(require('../page/classBack')), 'classBack'),
            meta: [{
                name: '在线课堂',
                path: '/studentMange'
            }, {
                name: '学小思教育',
                path: '/studentMange'
            }, {
                name: '直播课程',
                path: '/studentMange/schoolCourses'
            }, {
                name: '课程回放',
                path: '/studentMange/classBack'
            }, {
                name: '数学',
                path: '/studentMange/schoolCourses'
            }]
        },
        {
            path: '/studentMange/studentTestResult',
            component: r => require.ensure([], () => r(require('../page/studentTestResult')), 'studentTestResult'),
            meta: [{
                name: '在线课堂',
                path: '/studentMange'
            }, {
                name: '学小思教育',
                path: '/studentMange'
            }, {
                name: '直播课程',
                path: '/studentMange/schoolCourses'
            }, {
                name: '测试结果',
                path: '/studentMange/studentTestResult'
            }, {
                name: '数学',
                path: '/studentMange/schoolCourses'
            }]
        },
        // 填空题
        {
            path: '/studentMange/topic',
            component: r => require.ensure([], () => r(require('../page/topic')), 'topic'),
            meta: [{
                name: '在线课堂',
                path: '/studentMange'
            }, {
                name: '学小思教育',
                path: '/studentMange'
            }, {
                name: '直播课程',
                path: '/studentMange/schoolCourses'
            }, {
                name: '填空题',
                path: '/studentMange/topic'
            }, {
                name: '数学',
                path: '/studentMange/schoolCourses'
            }]
        },
        {
            path: '/studentMange/choose',
            component: r => require.ensure([], () => r(require('../page/choose')), 'choose'),
            meta: [{
                name: '在线课堂',
                path: '/studentMange'
            }, {
                name: '学小思教育',
                path: '/studentMange'
            }, {
                name: '直播课程',
                path: '/studentMange/schoolCourses'
            }, {
                name: '选择题',
                path: '/studentMange/choose'
            }, {
                name: '数学',
                path: '/studentMange/schoolCourses'
            } ]
        },
        {
            path: '/studentMange/judge',
            component: r => require.ensure([], () => r(require('../page/judge')), 'judge'),
            meta: [{
                name: '在线课堂',
                path: '/studentMange'
            }, {
                name: '学小思教育',
                path: '/studentMange'
            }, {
                name: '直播课程',
                path: '/studentMange/schoolCourses'
            }, {
                name: '判断题',
                path: '/studentMange/judge'
            }, {
                name: '数学',
                path: '/studentMange/schoolCourses'
            }]
        }

        ]
    },
    {
        path: '/myClass',
        component: r => require.ensure([], () => r(require('../page/myClass')), 'myClass')
    },
    {
        path: '/moreClass',
        component: r => require.ensure([], () => r(require('../page/moreClass')), 'moreClass')
    }
    ]
})
